import { createRouter, createWebHashHistory } from 'vue-router'
import Home from '../views/Home.vue'

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/owncenter',
    name: 'OwnCenter',
    component: () => import(/* webpackChunkName: "about" */ '../views/OwnCenter.vue')
  },
  {
    path: '/message',
    name: 'Message',
    component: () => import(/* webpackChunkName: "about" */ '../views/Message.vue')
  },
  {
    path: '/notice',
    name: 'Notice',
    component: () => import(/* webpackChunkName: "about" */ '../views/Notice.vue')
  },
  {
    path: '/writearticle',
    name: 'WriteArticle',
    component: () => import(/* webpackChunkName: "about" */ '../views/WriteArticle.vue')
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import(/* webpackChunkName: "about" */ '../views/Login.vue')
  },
  {
    path: '/articledetail',
    name: 'ArticleDetail',
    component: () => import(/* webpackChunkName: "about" */ '../views/ArticleDetail.vue')
  },
  {
    path: '/ownpage',
    name: 'OwnPage',
    component: () => import(/* webpackChunkName: "about" */ '../views/OwnPage.vue')
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },
  {
    path: '/test',
    name: 'Test',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/test.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
